<link rel="stylesheet" href="../src/css/pages/imageEdit.css">

<section id="msg_placeholder">
</section>


<div class="container-fluid image-container">
    <div class="content" id="adimage-edit-page">
        <!-- row -->
        <div class="row">
            <article class="col-sm-12">
                <div class="jarviswidget jarviswidget-sortable">
                    <!-- widget div-->
                    <div role="content">
                        <!-- widget content -->
                        <div class="widget-body">
                            <div class="container" id="image-edit-container" style="padding-right:50px;"></div>
                        </div>
                        <!-- end widget content -->
                    </div>
                    <!-- end widget div -->
                </div>
            </article>
        </div>
    </div>
</div>



<!-- #image-edit-container 图片编辑 模板 -->
<script type="text/x-template" id="t-adimage-edit">
    <% _.each(adimgages,function (img,i) { %>
    <div class="row adiamge-row" data-mid="<%=img.mongodbId%>">
        <div class="col-sm-7">
            <a class="thumbnail">
                <img src="<%=img.visitPath%>" title="<%=img.name%>" alt="<%=img.name%>" data-img="<%=img.visitPath%>">
            </a>
            <div class="caption">
                <div class="form-group text-center">
                    <div class="file-name-title">
                        <span><%=img.name%></span>
                        <a href="javascript:void(0)" class="edit-file-name"><i class="fa fa-edit btn-link"></i></a>
                    </div>
                    <input type="text" name="fileName" class="form-control input-sm hide" data-orgial-value="<%=img.imgName%>" value="<%=img.imgName%>" data-suffix="<%=img.imgSuffix%>" />
                </div>
            </div>
        </div>
        <div class="col-sm-5">
            <form class="form-horizontal">
                <fieldset>
                    <div class="form-group">
                        <label class="col-md-2 control-label">{{i18n-app}}</label>
                        <div class="col-md-10">
                            <select class="form-group-select2 app-select2" multiple="multiple" data-mid="<%=img.mongodbId%>" style="width:100%"  ></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">{{i18n-language}}</label>
                        <div class="col-md-10">
                            <select multiple="multiple" class="form-group-select2 language-select2" data-mid="<%=img.mongodbId%>" style="width:100%" ></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label class="col-md-2 control-label">{{i18n-gender}}</label>
                        <div class="col-md-10">
                            <select class="form-group-select2 sex-select2" data-mid="<%=img.mongodbId%>" style="width:100%">
                                <option value="">{{i18n-all}}</option>
                                <option value="1">{{i18n-male}}</option>
                                <option value="2">{{i18n-famale}}</option>
                            </select>
                        </div>
                    </div>
                </fieldset>
            </form>
            <div class="img-exist-area" data-uploder="<%=img.userIdSet%>">{{i18n-updateTime}}: ( <em><%=img.createTime%></em>  <em>{{i18n-uploader}}: <B><%=img.uploadUserName%></B></em> )</div>
        </div>
    </div>

        <hr />
    <% }) %>
        <div class="row">
            <div class="col-md-11">
            </div>
            <div class="col-md-1">
                <button id="btn-save" type="button" class="btn btn-primary right" id="query-btn">{{i18n-saveBtn}}</button>
            </div>
        </div>
</script>



<!-- #adimage  编辑图片中国家列表 模板 -->
<script type="text/x-template" id="t-edit-image-counties-content">
    <div class="smart-form">
        <section>
            <button type="button" class="close" data-dismiss="popover" aria-label="Close" style=""><span aria-hidden="true">&times;</span></button>
        </section>
        <% _.each(appCountries,function (countries,i) { %>
        <section>
            <label class="checkbox">
                <input type="checkbox" class="checkbox-item" name="checkbox-all" value="1"  <%=countries.checked%>>
                <i></i><strong><%=countries.connectionObjectName%></strong>
            </label>
            <div class="inline-group" style="margin-left: 25px">
                <% _.each(countries.countries,function (country,j) { %>
                <label class="checkbox">
                    <input type="checkbox" class="checkbox-item" name="checkbox-inline" value="<%=country.name%>" <%=country.checked%>>
                    <i></i><%=country.name%>
                </label>
                <% }) %>
            </div>
        </section>
        <% }) %>
    </div>
</script>

<div id="popover-from" class="hide" data-from="body"></div>
